﻿{% extends "./inc_baseNew.html" %}
{% block content %}
<link href="/static/assets/open-iconic/font/css/open-iconic-foundation.css" rel="stylesheet">
<style>
    .product-details-inner {
        margin:  30px;
    }

    .product-details-des .row .title {
        height: 60px;
        line-height: 50px;
        color: #58636d;
    }

    .panel-title {
        margin-top: 0;
        margin-bottom: 0;
        font-size: 18px;
        color: #000;
        font-weight: bold;
    }

    .product-details-des .row .cag {
        height: 30px;
        line-height: 30px;
        color: #58636d;
    }

    .cag-title {
        margin-top: 0;
        margin-bottom: 0;
        font-size: 20px;
        color: #000;
        font-weight: bold;
    }

    .biaoti {
        margin-top: 0;
        background-color: #f3f3f3;
    }

    .product-details-des .row {
        margin: 15px;
        font-size: 15px;
        color: #58636d;
    }

    .faburen-details .row {
        color: #000;
    }

    .row div:nth-child(2) {
        color: #000;
    }

    .row div.leixing {
        font-size: 20px;
        font-weight: bold;
        color: #58636d;
    }

    .desc {
        /* border-bottom: 1px solid #f3f3f3; */
        /* padding-bottom: 50px; */
    }

    .product-details-des .action_link {
        margin: 35px 0 0 0;
    }

    span.item-price {
        font-size: 20px;
        font-weight: bold;
        color: #ed1a24 !important;
    }

    .swiper-slide-visible {
        opacity: 0.5;
    }

    .swiper-slide-thumb-active {
        border: 3px solid #7acf39;
        margin: 0 4px;
        opacity: 1;
    }

    .gallery-thumbs {
        margin-top: 5px;
    }

    .gallery-thumbs .swiper-slide {
        width: 66px;
        height: 52px;
    }
</style>
<div class="container margin-boot-25">
    <div class="member-area-from-wrap">
        <div class="row">
            <div class="col">
                <div class="login-reg-form-wrap" style="margin-top: 20px">
                    <div class="row">
                        <div class="col">
                            <!-- product details inner end -->
                            <div class="product-details-inner">
                                <div class="row">
                                    <div class="col-4">
                                        <!-- Swiper -->
                                        <div class="swiper-container gallery-top" style=" width:380px;height: 270px">
                                            <div class="swiper-wrapper">
                                                {% for u in url %}
                                                <div class="swiper-slide"
                                                    style="background-image:url({{u}}); background-size: 380px 270px;">
                                                </div>
                                                {% endfor %}
                                            </div>
                                        </div>
                                        <div class="swiper-container gallery-thumbs row"
                                            style="width:380px;height: 58px">
                                            <div class="swiper-wrapper">
                                                {% for u in url %}
                                                <div class="swiper-slide"
                                                    style="background-image:url({{u}}); background-size: 66px 58px;background-repeat: round;">
                                                </div>
                                                {% endfor %}
                                            </div>

                                        </div>
                                        <!-- Swiper -->
                                        {% if user %}
                                        <div class="product-details-des faburen-details">
                                            <!-- <div class="row desc">
                                                <div class="col">用户组{{user.groupid}}</div>
                                            </div> -->
                                            <div class="row">
                                                <div class="col">{{user.gsmc}}</div>
                                            </div>
                                            <div class="row">
                                                <div class="col">联系人：{{user.real_name}}</div>
                                            </div>
                                            <div class="row">
                                                <div class="col">联系电话：{{user.mobile}}</div>
                                            </div>
                                        </div>
                                        {% endif %}
                                    </div>
                                    <div class="col-8">
                                        <div class="col product-details-des">
                                            <div class="row ">
                                                <div class="col-7 cag-title">{{gongxufabu.shangpingleibie}}</div>
                                                <div class="col-5 cag">信息编号：{{gongxufabu.fabu_no}}</div>
                                            </div>
                                            <div class="row biaoti">
                                                <div class="col-7 title panel-title">{{gongxufabu.xinxibiaoti}}
                                                </div>
                                                <div class="col-5 title">
                                                    发布日期：{{gongxufabu.chuangjianshijian|dateformat('Y-m-d')}}</div>
                                            </div>
                                            <div class="row">
                                                <div class="col-2">信息类型</div>
                                                <div class="col-10 leixing">
                                                    {{gongxufabu.xinxileixing|get_gongxutype}}</div>
                                            </div>
                                            <div class="row">
                                                <div class="col-2">商品价格</div>
                                                <div class="col-10"><span
                                                        class="item-price">{{gongxufabu.jiage|formatCurrencyNoDot}}</span><span>
                                                        元/吨</span></div>
                                            </div>
                                            <div class="row">
                                                <div class="col-2">预计数量</div>
                                                <div class="col-8"><span
                                                        class="item-price">{{gongxufabu.shangpingshuliang|formatCurrencyNoDot}}</span><span>
                                                        吨</span></div>
                                            </div>
                                            <div class="row">
                                                <div class="col-2">预计货款</div>
                                                <div class="col-10"><span
                                                        class="item-price">{{gongxufabu.zongjia|formatCurrencyNoDot}}</span><span>
                                                        元</span></div>
                                            </div>
                                            <div class="row">
                                                <div class="col-2">所在地区</div>
                                                <div class="col-10">{{gongxufabu.diqu}}</div>
                                            </div>
                                            <div class="row">
                                                <div class="col-2">位置详细</div>
                                                <div class="col-10">{{gongxufabu.suozaiweizhi}}</div>
                                            </div>
                                            <div class="row">
                                                <div class="col-2">有效期至</div>
                                                <div class="col-10">
                                                    {{gongxufabu.chuangjianshijian|moment('YYYY-MM-DD',gongxufabu.youxiaoqi|get_youxiaotianshu)}}
                                                </div>
                                            </div>
                                            <div class="row desc">
                                                <div class="col-2">商品描述</div>
                                                <div class="col-10">{{gongxufabu.leirongmiaoshu}}</div>
                                            </div>

                                            <div class="row action_link justify-content-center">
                                                {%if showXiaDanBotton %}
                                                <form method="post" id="xinxifabu" class="form-xiadan col-4 text-center"
                                                    action="/home/gongxufabu/xiadan" data-validate="parsley">
                                                    <input type="hidden" name="gongxufabuid" readonly required
                                                        value="{{gongxufabu.id}}">
                                                    <a class="btn btn-primary"
                                                        {{('/mod/order/index/queren')|get_auth_url(controller.user, 'data-toggle="ajaxModal"')| safe}}
                                                        target-form="form-xiadan"
                                                        style="border-radius: 0;width: 120px;">我要下单</a>

                                                </form>
                                                {%endif%}
                                                {%if showLiaoJieBotton %}
                                                <form class="form-consult  col-4 text-center"
                                                    action="/home/consult" data-validate="parsley">
                                                    <input type="hidden" name="gongxufabuid" readonly required
                                                        value="{{gongxufabu.id}}">
                                                    <a class="btn btn-primary" 
                                                        {{('/home/consult?id='+gongxufabu.id)|get_auth_url(controller.user,'data-toggle="ajaxModal"')| safe}}
                                                        style="border-radius: 0;width: 120px;">我要了解</a>
                                                </form>
                                                {%endif%}
                                                {%if showCancelBotton %}
                                                <form method="post" id="xinxiCancel" class="form-cancel col-4 text-center"
                                                    action="/home/gongxufabu/cancel" data-validate="parsley">
                                                    <input type="hidden" name="id" readonly required
                                                        value="{{gongxufabu.id}}">
                                                    <a class="btn btn-primary confirm" message="请确认撤销发布"
                                                        act="ajax-post" target-form="form-cancel"
                                                        style="border-radius: 0;width: 120px;">&nbsp;&nbsp;&nbsp;&nbsp;撤销&nbsp;&nbsp;&nbsp;&nbsp;</a>
                                                </form>
                                                {%endif%}
                                                {% if controller.referer()|get_pathname=='center/fabu' and gongxufabu.status == 5 and gongxufabu.faburen==controller.is_login%}
                                                <form method="post" id="xinxixiajia" class="form-xiajia col-4 text-center"
                                                    action="/home/gongxufabu/xiajia" data-validate="parsley">
                                                    <input type="hidden" name="id" readonly required
                                                        value="{{gongxufabu.id}}">
                                                    <a class="btn btn-primary confirm" message="请确认下架信息"
                                                        act="ajax-post" target-form="form-xiajia"
                                                        style="border-radius: 0;width: 120px;">&nbsp;&nbsp;&nbsp;&nbsp;下架&nbsp;&nbsp;&nbsp;&nbsp;</a>
                                                </form>
                                                {%endif%}
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                <section class="process-wrap">
                    <img src="/static/assets_new/img/banner/xiadan_banner.png" alt="">
                </section>
                <div class="process-wrap" style="padding-bottom: 0; margin-bottom: 0;">
                    <div class="col" style="padding: 0;">
                        <div class="row" style="margin:0;">
                            <h2 class="col" style=" font-size: 20px; text-align: center;">信息推荐</h2>
                            <div class="col"></div>
                            <div class="col"></div>
                            <div class="col"></div>
                            <div class="col"></div>
                            <div class="col"></div>
                            <div class="col"></div>
                            <a class="col" href="/shangping"> 更多&gt;</a>
                        </div>
                        <div class="info-wrap">
                            <div class="row info-title">
                                <div class="col">商品图片</div>
                                <div class="col">信息类型</div>
                                <div class="col">商品类别</div>
                                <div class="col">预计数量</div>
                                <div class="col">商品价格</div>
                                <div class="col">所在地区</div>
                                <div class="col">发布日期</div>
                                <div class="col">操作</div>
                            </div>
                            {% for item in gongxuinfo %}
                            <div class="row align-items-center">
                                <div class="col">
                                    {% set img = item.tupian|strToJson %}
                                    {%if img.length >0 %}
                                    <img src="{{img[0]}}" alt="">
                                    {% else %}
                                    <img src="/static/assets_new/img/blank.png">
                                    {% endif %}
                                </div>
                                <div class="col">{{ item.xinxileixing |get_gongxutype}}</div>
                                <div class="col">{{item.shangpingleibie}}</div>
                                <div class="col">{{item.shangpingshuliang}}吨</div>
                                <div class="col">{{item.jiage}}元/吨</div>
                                <div class="col">{{item.diqu}}</div>
                                <div class="col">{{item.chuangjianshijian.split(" ")[0]}}</div>
                                <div class="col"><a class="btn btn-sm btn-primary" style="    border: 1px solid #007bff;
                                        color: #007bff;
                                        background-color: #fff;"
                                        href="/home/gongxufabu/detail/?id={{item.id}}">查看详情</a></div>
                            </div>
                            {% endfor %}
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
</div>
{% endblock %}